package com.yanqu.road.server.cmd.cricket.court;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.cricket.CricketProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.cricket.CricketModule;
import com.yanqu.road.server.protocol.GameProtocol;

@Cmd(code = GameProtocol.S_CRICKET_COURT_SYNC_DATA, desc = "蛐蛐竞技场信息同步")
public class CricketCourtSyncDataCmd extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        CricketProto.CricketCourtDataSyncReqMsg reqMsg = CricketProto.CricketCourtDataSyncReqMsg.parseFrom(packet.getBytes());
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        player.getModule(CricketModule.class).cricketCourtSyncData();
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
